package com.sina.shop.manage.service.address;

import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.address.Address;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2018-01-03-16:03
 */
public interface AddressManageService extends BaseService {

    Address getAddressByName(String name);

    Address getAddressById(Long id);

    int deleteAddress(Long id) throws DataException, UpdateException;

    Address saveAddress(Address address) throws CreateException, ResourceExistsException, DataException;

    Address updateAddress(Address address) throws UpdateException, DataException;

    List<Map<String, Object>> getAddressList(Address address, Long count[]);

    int updateAddressStatus(Long aid)throws UpdateException;
}
